package com.yupi.yuoj.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yupi.yuoj.model.dto.populartags.PopularTagsQueryRequest;
import com.yupi.yuoj.model.entity.PopularTags;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yuoj.model.vo.PopularTagsVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author admin
* @description 针对表【popular_tags(热门标签表)】的数据库操作Service
* @createDate 2025-11-01 21:27:49
*/
public interface PopularTagsService extends IService<PopularTags> {

    /**
     * 校验数据
     *
     * @param popularTags
     * @param add 对创建的数据进行校验
     */
    void validPopularTags(PopularTags popularTags, boolean add);

    /**
     * 获取查询条件
     *
     * @param popularTagsQueryRequest
     * @return
     */
    QueryWrapper<PopularTags> getQueryWrapper(PopularTagsQueryRequest popularTagsQueryRequest);
    
    /**
     * 获取热门标签封装
     *
     * @param popularTags
     * @param request
     * @return
     */
    PopularTagsVO getPopularTagsVO(PopularTags popularTags, HttpServletRequest request);

    /**
     * 分页获取热门标签封装
     *
     * @param popularTagsPage
     * @param request
     * @return
     */
    Page<PopularTagsVO> getPopularTagsVOPage(Page<PopularTags> popularTagsPage, HttpServletRequest request);

}
